﻿using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace QuestPrototype.Screen_Manager.Screens
{
    class TitleScreen : BaseScreen
    {
        private double AniTime = 0;
    private int r  = 0;
    private int g   = 0;
    private int b  = 192;
        private Random rnd = new Random();

        public TitleScreen()
        {
            Name = "TitleScreen";
            State = ScreenState.Active;
        }


        public override void HandleInput()
        {

        }

        public override void Update()
        {
            AniTime += Globals.GameTime.ElapsedGameTime.TotalMilliseconds;

            if (AniTime > 100)
	{
		 r = rnd.Next(40, 200);
            g = rnd.Next(40, 200);
            b = rnd.Next(40, 200);
            AniTime = 0;
	}
  
        }

        public override void Draw()
        {
            base.Draw();

        Globals.SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullNone);
        Globals.SpriteBatch.Draw(Textures.Menu1, new Rectangle(0, 0, (int)Globals.GameSize.X, (int)Globals.GameSize.Y), new Rectangle(0, 0, 1, 64), new Color(255, 92, 38));
        Globals.SpriteBatch.DrawString(Fonts.Georgia_16, "Adventures In", new Vector2(10, 10), new Color(230, 215, 184), 0, new Vector2(0, 0), 3, SpriteEffects.None, 0);
        Globals.SpriteBatch.DrawString(Fonts.Georgia_16, "XNA!", new Vector2(131, 98), new Color(r, g, b), 0, new Vector2(0, 0), 5, SpriteEffects.None, 0);
        Globals.SpriteBatch.DrawString(Fonts.Georgia_16, "XNA!", new Vector2(133, 100), new Color(r, g, b), 0, new Vector2(0, 0), 5, SpriteEffects.None, 0);
        Globals.SpriteBatch.DrawString(Fonts.Georgia_16, "XNA!", new Vector2(132, 99), new Color(1, 1, 1), 0, new Vector2(0, 0), 5, SpriteEffects.None, 0);
        Globals.SpriteBatch.End();
        }

    }
}
